package com.example.ftp.Service.Impl;

import com.example.ftp.Dao.Impl.SiteManagerDaoImpl;
import com.example.ftp.Beans.Site;
import com.example.ftp.Service.SiteManagerService;
import javafx.collections.ObservableList;

import java.util.List;

/**
 * @author : yhp
 */

public class SiteManagerServiceImpl implements SiteManagerService {

    SiteManagerDaoImpl siteManagerDao = new SiteManagerDaoImpl();

    @Override
    public void AddSite(Site newSite) {
        siteManagerDao.AddSite(newSite);
    }

    @Override
    public boolean DeleteSite(String ip, String port) {
        return siteManagerDao.DeleteSite(ip,port);
    }

    @Override
    public void Serialization() {
        siteManagerDao.Serialization();
    }

    @Override
    public void Deserialization() {
        siteManagerDao.Deserialization();
    }

    @Override
    public ObservableList<Site> getSiteList() {
        return siteManagerDao.getSiteList();
    }
}
